package com.szh.mysobproject.http.request.api

import com.szh.mysobproject.model.ApiResponse
import com.szh.mysobproject.model.ArticleInfo
import com.szh.mysobproject.util.SUNNY_BEACH_API_BASE_URL
import retrofit2.http.GET
import retrofit2.http.Path

interface HomeApi {

    /**
     * 获取推荐内容
     */
    @GET("${SUNNY_BEACH_API_BASE_URL}ct/content/home/recommend/{page}")
    suspend fun getRecommendContent(@Path("page") page: Int): ApiResponse<ArticleInfo>

    /**
     * 根据分类id获取内容
     */
    @GET("${SUNNY_BEACH_API_BASE_URL}ct/content/home/recommend/{categoryId}/{page}")
    suspend fun getArticleListByCategoryId(
        @Path("categoryId") categoryId: String,
        @Path("page") page: Int
    ): ApiResponse<ArticleInfo>
}